#tcp client
from socket import *
host = "localhost"
port = 40087
addr = (host,port)
tcpcli = socket(AF_INET,SOCK_STREAM)
tcpcli.connect(addr)

while 1:
    msg = raw_input("Send:")
    tcpcli.send(msg)
    data = tcpcli.recv(1024)
    print("data is %s"%data)
